using UnityEngine;

public class GamePoolTimer : MonoBehaviour
{
	public float TimeToReturn;

	private float _timeToReturn;

	private void OnPoolActivate()
	{
		_timeToReturn = TimeToReturn;
	}

	private void Update()
	{
		if (!(_timeToReturn <= 0f))
		{
			_timeToReturn -= Time.deltaTime;
			if (_timeToReturn <= 0f)
			{
				GamePoolManager.ReturnGameObjectToPool(base.gameObject);
			}
		}
	}
}
